package com.zcl.Thread.t1;

/**
 * @Description:
 * @author: zcl
 * @date: 2022/3/9  15:26
 */
public class ThreadDemo {

    public static void main(String[] args) {
        new Thread() {
            @Override
            public void run() {
                for (int i = 0; i < 100; i++) {
                    if (i % 2 == 0) {
                        System.out.println("thread1 " + i);
                    }
                }
            }
        }.start();
        new Thread(() -> {
            for (int i = 0; i < 100; i++) {
                if (i % 2 != 0) {
                    System.out.println("thread2 " + i);
                }
            }
        }).start();
    }

}
